\(\int \frac {e^{-a-b x} (a+b x)^3}{x^2} \, dx\) [61]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [A] (verification not implemented)
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 21, antiderivative size = 94 \[ \int \frac {e^{-a-b x} (a+b x)^3}{x^2} \, dx=-b e^{-a-b x}-3 a b e^{-a-b x}-\frac {a^3 e^{-a-b x}}{x}-b^2 e^{-a-b x} x+3 a^2 b e^{-a} \operatorname {ExpIntegralEi}(-b x)-a^3 b e^{-a} \operatorname {ExpIntegralEi}(-b x) \]

[Out]

-b*exp(-b*x-a)-3*a*b*exp(-b*x-a)-a^3*exp(-b*x-a)/x-b^2*exp(-b*x-a)*x+3*a^2*b*Ei(-b*x)/exp(a)-a^3*b*Ei(-b*x)/ex
p(a)

Rubi [A] (verified)

Time = 0.10 (sec) , antiderivative size = 94, normalized size of antiderivative = 1.00, number of steps used = 8, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.238, Rules used = {2230, 2225, 2208, 2209, 2207} \[ \int \frac {e^{-a-b x} (a+b x)^3}{x^2} \, dx=e^{-a} a^3 (-b) \operatorname {ExpIntegralEi}(-b x)-\frac {a^3 e^{-a-b x}}{x}+3 e^{-a} a^2 b \operatorname {ExpIntegralEi}(-b x)-b^2 x e^{-a-b x}-3 a b e^{-a-b x}-b e^{-a-b x} \]

[In]

Int[(E^(-a - b*x)*(a + b*x)^3)/x^2,x]

[Out]

-(b*E^(-a - b*x)) - 3*a*b*E^(-a - b*x) - (a^3*E^(-a - b*x))/x - b^2*E^(-a - b*x)*x + (3*a^2*b*ExpIntegralEi[-(
b*x)])/E^a - (a^3*b*ExpIntegralEi[-(b*x)])/E^a

Rule 2207

Int[((b_.)*(F_)^((g_.)*((e_.) + (f_.)*(x_))))^(n_.)*((c_.) + (d_.)*(x_))^(m_.), x_Symbol] :> Simp[(c + d*x)^m*
((b*F^(g*(e + f*x)))^n/(f*g*n*Log[F])), x] - Dist[d*(m/(f*g*n*Log[F])), Int[(c + d*x)^(m - 1)*(b*F^(g*(e + f*x
)))^n, x], x] /; FreeQ[{F, b, c, d, e, f, g, n}, x] && GtQ[m, 0] && IntegerQ[2*m] &&  !TrueQ[$UseGamma]

Rule 2208

Int[((b_.)*(F_)^((g_.)*((e_.) + (f_.)*(x_))))^(n_.)*((c_.) + (d_.)*(x_))^(m_), x_Symbol] :> Simp[(c + d*x)^(m
+ 1)*((b*F^(g*(e + f*x)))^n/(d*(m + 1))), x] - Dist[f*g*n*(Log[F]/(d*(m + 1))), Int[(c + d*x)^(m + 1)*(b*F^(g*
(e + f*x)))^n, x], x] /; FreeQ[{F, b, c, d, e, f, g, n}, x] && LtQ[m, -1] && IntegerQ[2*m] &&  !TrueQ[$UseGamm
a]

Rule 2209

Int[(F_)^((g_.)*((e_.) + (f_.)*(x_)))/((c_.) + (d_.)*(x_)), x_Symbol] :> Simp[(F^(g*(e - c*(f/d)))/d)*ExpInteg
ralEi[f*g*(c + d*x)*(Log[F]/d)], x] /; FreeQ[{F, c, d, e, f, g}, x] &&  !TrueQ[$UseGamma]

Rule 2225

Int[((F_)^((c_.)*((a_.) + (b_.)*(x_))))^(n_.), x_Symbol] :> Simp[(F^(c*(a + b*x)))^n/(b*c*n*Log[F]), x] /; Fre
eQ[{F, a, b, c, n}, x]

Rule 2230

Int[(F_)^((c_.)*(v_))*(u_)^(m_.)*(w_), x_Symbol] :> Int[ExpandIntegrand[F^(c*ExpandToSum[v, x]), w*NormalizePo
werOfLinear[u, x]^m, x], x] /; FreeQ[{F, c}, x] && PolynomialQ[w, x] && LinearQ[v, x] && PowerOfLinearQ[u, x]
&& IntegerQ[m] &&  !TrueQ[$UseGamma]

Rubi steps \begin{align*} \text {integral}& = \int \left (3 a b^2 e^{-a-b x}+\frac {a^3 e^{-a-b x}}{x^2}+\frac {3 a^2 b e^{-a-b x}}{x}+b^3 e^{-a-b x} x\right ) \, dx \\ & = a^3 \int \frac {e^{-a-b x}}{x^2} \, dx+\left (3 a^2 b\right ) \int \frac {e^{-a-b x}}{x} \, dx+\left (3 a b^2\right ) \int e^{-a-b x} \, dx+b^3 \int e^{-a-b x} x \, dx \\ & = -3 a b e^{-a-b x}-\frac {a^3 e^{-a-b x}}{x}-b^2 e^{-a-b x} x+3 a^2 b e^{-a} \text {Ei}(-b x)-\left (a^3 b\right ) \int \frac {e^{-a-b x}}{x} \, dx+b^2 \int e^{-a-b x} \, dx \\ & = -b e^{-a-b x}-3 a b e^{-a-b x}-\frac {a^3 e^{-a-b x}}{x}-b^2 e^{-a-b x} x+3 a^2 b e^{-a} \text {Ei}(-b x)-a^3 b e^{-a} \text {Ei}(-b x) \\ \end{align*}

Mathematica [A] (verified)

Time = 0.19 (sec) , antiderivative size = 54, normalized size of antiderivative = 0.57 \[ \int \frac {e^{-a-b x} (a+b x)^3}{x^2} \, dx=\frac {e^{-a-b x} \left (-a^3-3 a b x-b x (1+b x)-(-3+a) a^2 b e^{b x} x \operatorname {ExpIntegralEi}(-b x)\right )}{x} \]

[In]

Integrate[(E^(-a - b*x)*(a + b*x)^3)/x^2,x]

[Out]

(E^(-a - b*x)*(-a^3 - 3*a*b*x - b*x*(1 + b*x) - (-3 + a)*a^2*b*E^(b*x)*x*ExpIntegralEi[-(b*x)]))/x

Maple [A] (verified)

Time = 0.20 (sec) , antiderivative size = 88, normalized size of antiderivative = 0.94

method result size
risch \(-3 a b \,{\mathrm e}^{-b x -a}-b^{2} {\mathrm e}^{-b x -a} x -b \,{\mathrm e}^{-b x -a}-\frac {a^{3} {\mathrm e}^{-b x -a}}{x}+b \,a^{3} {\mathrm e}^{-a} \operatorname {Ei}_{1}\left (b x \right )-3 b \,a^{2} {\mathrm e}^{-a} \operatorname {Ei}_{1}\left (b x \right )\) \(88\)
derivativedivides \(b \left (-2 a \,{\mathrm e}^{-b x -a}+\left (-b x -a \right ) {\mathrm e}^{-b x -a}-{\mathrm e}^{-b x -a}-a^{3} \left (\frac {{\mathrm e}^{-b x -a}}{b x}-{\mathrm e}^{-a} \operatorname {Ei}_{1}\left (b x \right )\right )-3 a^{2} {\mathrm e}^{-a} \operatorname {Ei}_{1}\left (b x \right )\right )\) \(92\)
default \(b \left (-2 a \,{\mathrm e}^{-b x -a}+\left (-b x -a \right ) {\mathrm e}^{-b x -a}-{\mathrm e}^{-b x -a}-a^{3} \left (\frac {{\mathrm e}^{-b x -a}}{b x}-{\mathrm e}^{-a} \operatorname {Ei}_{1}\left (b x \right )\right )-3 a^{2} {\mathrm e}^{-a} \operatorname {Ei}_{1}\left (b x \right )\right )\) \(92\)
meijerg \(b \,{\mathrm e}^{-a} \left (1-\frac {\left (2 b x +2\right ) {\mathrm e}^{-b x}}{2}\right )+3 \,{\mathrm e}^{-a} b a \left (1-{\mathrm e}^{-b x}\right )+3 b \,{\mathrm e}^{-a} a^{2} \left (\ln \left (x \right )+\ln \left (b \right )-\ln \left (b x \right )-\operatorname {Ei}_{1}\left (b x \right )\right )+{\mathrm e}^{-a} a^{3} b \left (-\frac {1}{b x}+1-\ln \left (x \right )-\ln \left (b \right )+\frac {-2 b x +2}{2 b x}-\frac {{\mathrm e}^{-b x}}{b x}+\ln \left (b x \right )+\operatorname {Ei}_{1}\left (b x \right )\right )\) \(131\)

[In]

int(exp(-b*x-a)*(b*x+a)^3/x^2,x,method=_RETURNVERBOSE)

[Out]

-3*a*b*exp(-b*x-a)-b^2*exp(-b*x-a)*x-b*exp(-b*x-a)-a^3*exp(-b*x-a)/x+b*a^3*exp(-a)*Ei(1,b*x)-3*b*a^2*exp(-a)*E
i(1,b*x)

Fricas [A] (verification not implemented)

none

Time = 0.25 (sec) , antiderivative size = 56, normalized size of antiderivative = 0.60 \[ \int \frac {e^{-a-b x} (a+b x)^3}{x^2} \, dx=-\frac {{\left (a^{3} - 3 \, a^{2}\right )} b x {\rm Ei}\left (-b x\right ) e^{\left (-a\right )} + {\left (b^{2} x^{2} + a^{3} + {\left (3 \, a + 1\right )} b x\right )} e^{\left (-b x - a\right )}}{x} \]

[In]

integrate(exp(-b*x-a)*(b*x+a)^3/x^2,x, algorithm="fricas")

[Out]

-((a^3 - 3*a^2)*b*x*Ei(-b*x)*e^(-a) + (b^2*x^2 + a^3 + (3*a + 1)*b*x)*e^(-b*x - a))/x

Sympy [A] (verification not implemented)

Time = 1.47 (sec) , antiderivative size = 99, normalized size of antiderivative = 1.05 \[ \int \frac {e^{-a-b x} (a+b x)^3}{x^2} \, dx=- \frac {a^{3} e^{- a} \operatorname {E}_{2}\left (b x\right )}{x} + 3 a^{2} b e^{- a} \operatorname {Ei}{\left (- b x \right )} + 3 a b^{2} \left (\begin {cases} x & \text {for}\: b = 0 \\- \frac {e^{- b x}}{b} & \text {otherwise} \end {cases}\right ) e^{- a} + b^{3} x \left (\begin {cases} x & \text {for}\: b = 0 \\- \frac {e^{- b x}}{b} & \text {otherwise} \end {cases}\right ) e^{- a} - b^{3} \left (\begin {cases} \frac {x^{2}}{2} & \text {for}\: b = 0 \\- \frac {\begin {cases} - \frac {e^{- b x}}{b} & \text {for}\: b \neq 0 \\x & \text {otherwise} \end {cases}}{b} & \text {otherwise} \end {cases}\right ) e^{- a} \]

[In]

integrate(exp(-b*x-a)*(b*x+a)**3/x**2,x)

[Out]

-a**3*exp(-a)*expint(2, b*x)/x + 3*a**2*b*exp(-a)*Ei(-b*x) + 3*a*b**2*Piecewise((x, Eq(b, 0)), (-exp(-b*x)/b,
True))*exp(-a) + b**3*x*Piecewise((x, Eq(b, 0)), (-exp(-b*x)/b, True))*exp(-a) - b**3*Piecewise((x**2/2, Eq(b,
 0)), (-Piecewise((-exp(-b*x)/b, Ne(b, 0)), (x, True))/b, True))*exp(-a)

Maxima [A] (verification not implemented)

none

Time = 0.24 (sec) , antiderivative size = 61, normalized size of antiderivative = 0.65 \[ \int \frac {e^{-a-b x} (a+b x)^3}{x^2} \, dx=-a^{3} b e^{\left (-a\right )} \Gamma \left (-1, b x\right ) + 3 \, a^{2} b {\rm Ei}\left (-b x\right ) e^{\left (-a\right )} - {\left (b x + 1\right )} b e^{\left (-b x - a\right )} - 3 \, a b e^{\left (-b x - a\right )} \]

[In]

integrate(exp(-b*x-a)*(b*x+a)^3/x^2,x, algorithm="maxima")

[Out]

-a^3*b*e^(-a)*gamma(-1, b*x) + 3*a^2*b*Ei(-b*x)*e^(-a) - (b*x + 1)*b*e^(-b*x - a) - 3*a*b*e^(-b*x - a)

Giac [A] (verification not implemented)

none

Time = 0.29 (sec) , antiderivative size = 92, normalized size of antiderivative = 0.98 \[ \int \frac {e^{-a-b x} (a+b x)^3}{x^2} \, dx=-\frac {a^{3} b x {\rm Ei}\left (-b x\right ) e^{\left (-a\right )} - 3 \, a^{2} b x {\rm Ei}\left (-b x\right ) e^{\left (-a\right )} + b^{2} x^{2} e^{\left (-b x - a\right )} + a^{3} e^{\left (-b x - a\right )} + 3 \, a b x e^{\left (-b x - a\right )} + b x e^{\left (-b x - a\right )}}{x} \]

[In]

integrate(exp(-b*x-a)*(b*x+a)^3/x^2,x, algorithm="giac")

[Out]

-(a^3*b*x*Ei(-b*x)*e^(-a) - 3*a^2*b*x*Ei(-b*x)*e^(-a) + b^2*x^2*e^(-b*x - a) + a^3*e^(-b*x - a) + 3*a*b*x*e^(-
b*x - a) + b*x*e^(-b*x - a))/x

Mupad [B] (verification not implemented)

Time = 0.24 (sec) , antiderivative size = 72, normalized size of antiderivative = 0.77 \[ \int \frac {e^{-a-b x} (a+b x)^3}{x^2} \, dx=a^3\,b\,{\mathrm {e}}^{-a}\,\left (\mathrm {expint}\left (b\,x\right )-\frac {{\mathrm {e}}^{-b\,x}}{b\,x}\right )-3\,a\,b\,{\mathrm {e}}^{-a-b\,x}-b\,{\mathrm {e}}^{-a-b\,x}\,\left (b\,x+1\right )-3\,a^2\,b\,{\mathrm {e}}^{-a}\,\mathrm {expint}\left (b\,x\right ) \]

[In]

int((exp(- a - b*x)*(a + b*x)^3)/x^2,x)

[Out]

a^3*b*exp(-a)*(expint(b*x) - exp(-b*x)/(b*x)) - 3*a*b*exp(- a - b*x) - b*exp(- a - b*x)*(b*x + 1) - 3*a^2*b*ex
p(-a)*expint(b*x)